/*
 * Copyright © 2023-2025 puyinzhen
 * All rights reserved.
 *
 * The copyright of this work (or idea/project/document) is owned by puyinzhen. Without explicit written permission, no part of this work may be reproduced, distributed, or modified in any form for commercial purposes.
 *
 * This copyright statement applies to, but is not limited to: concept descriptions, design documents, source code, images, presentation files, and any related content.
 *
 * For permission to use this work or any part of it, please contact 1182810784@qq.com to obtain written authorization.
 */

.code-editor-container {
  position: relative;
  background-color: #1E1E2F;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;

  .monaco-editor-container {
    border: 1px solid #3A3A4E;
    border-radius: 4px;
    transition: border-color 0.2s;

    &:hover {
      border-color: #4FB8FF;
    }
  }

  .monaco-editor-button-bar {
    display: flex;
    flex-direction: row-reverse;
    padding: 0 8px 8px 0;

    .editor-full-btn {
      position: relative;
      top: -24px;
      right: 6px;
      font-size: 16px;
      color: #A0A0B2;
      transition: all 0.2s;
      background-color: #2C2C3E;
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
      cursor: pointer;

      &:hover {
        color: #4FB8FF;
        background-color: lighten(#2C2C3E, 5%);
      }

      &:active {
        background-color: darken(#2C2C3E, 5%);
      }
    }
  }

  // FullEditor 模态框样式
  .ant-modal {
    .ant-modal-content {
      background-color: #1E1E2F;
      border-radius: 8px;

      .ant-modal-header {
        background-color: #2C2C3E;
        border-bottom: 1px solid #3A3A4E;
        border-radius: 8px 8px 0 0;

        .ant-modal-title {
          color: #FFFFFF;
          font-size: 18px;
          font-weight: 600;
        }
      }

      .ant-modal-body {
        padding: 0;

        .monaco-editor-container {
          border: none;
          border-radius: 0;
        }
      }

      .ant-modal-footer {
        border-top: 1px solid #3A3A4E;
        padding: 12px 20px;
        background-color: #2C2C3E;
        border-radius: 0 0 8px 8px;

        .ant-btn {
          height: 30px;
          padding: 0 16px;
          border-radius: 4px;
          font-size: 14px;
          transition: all 0.2s;

          &-default {
            background-color: transparent;
            border-color: #4FB8FF;
            color: #4FB8FF;

            &:hover {
              background-color: rgba(79, 184, 255, 0.1);
              border-color: lighten(#4FB8FF, 10%);
              color: lighten(#4FB8FF, 10%);
            }
          }

          &-primary {
            background-color: #4FB8FF;
            border-color: #4FB8FF;
            color: #FFFFFF;

            &:hover {
              background-color: lighten(#4FB8FF, 10%);
              border-color: lighten(#4FB8FF, 10%);
            }
          }
        }
      }
    }
  }
}

